from django.db import models
from django.contrib.auth.models import AbstractUser

# Create your models here.
class User(AbstractUser):
    # unique=True 同一个值在同一个表同一个字段中只能出现一次，唯一索引　
    mobile = models.CharField(verbose_name="手机号码", max_length=15,unique=True)
    avatar = models.ImageField(upload_to='avatar', verbose_name='用户头像', null=True, blank=True, help_text="头像图片的大小规格：256x256，或者对应的比例的图片")
    tel = models.CharField(verbose_name="客服联系电话",max_length=64)
    class Meta:
        db_table = 'custom_users'
        verbose_name = '用户'
        verbose_name_plural = verbose_name
